import Vue from 'vue'
import elementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import axios from 'axios'
import vueAxios from 'vue-axios'

import router from './router/index'
import App from './App.vue'
import './assets/css/common.css'

Vue.config.productionTip = false
Vue.use(elementUI)

Vue.use(vueAxios, axios)

axios.defaults.baseURL = 'http://192.168.0.105:8888/api/'
axios.interceptors.request.use(config => {
  config.headers.Authorization = window.sessionStorage.getItem('token')
  return config
})

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
